from abc import ABCMeta, abstractmethod

from time import sleep

class Windows(metaclass=ABCMeta):
    @abstractmethod
    def start(self):
        pass

    @abstractmethod
    def repaint(self):
        pass
    @abstractmethod
    def stop(self):
        pass

    def run(self):
        self.start();
        while True:
            self.repaint()
            sleep(10)
            break
        self.stop()


class MyWindows(Windows):
    def __init__(self,msg):
        self.msg = msg

    def start(self):
        print("窗口开始运行")
    def stop(self):
        print("窗口结束运行")
    def repaint(self):
        print("repaint  "+self.msg)



MyWindows("hello").run()
